package jun.empdepmanagersystem02.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.Date;

@Data
public class Emp {
    private Integer id = null;
    private String username;
    private String password = "password";
    private String name;
    private Integer gender;
    private String image;
    private Integer job;

    private Date entrydate = null;
    private Integer deptId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime, updateTime;


    @Data
    @NoArgsConstructor
    public static class Selector extends Emp {
        @DateTimeFormat(pattern = "yyyy-MM-dd")
        private Date begin;
        @DateTimeFormat(pattern = "yyyy-MM-dd")
        private Date end;
        private Integer page = 1, pageSize = 5;//默认page=1 pagesize=10
        private boolean MsgShow = false;


        public Selector(Integer id,boolean ismsgShow) {
            this.setId(id);
            this.MsgShow=true;
        }


    }

}
